package com.eliza.spring.boot.library.controller

import com.eliza.spring.boot.library.mapper.IUserMapper
import com.eliza.spring.boot.library.model.SpringUser
import org.springframework.stereotype.Controller
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.ResponseBody
import javax.annotation.Resource


/*-*- coding:utf-8 -*-
 * @Author  : debi
 * @Time    : 4/19/22
 * @Software: IntelliJ IDEA
 */
@Controller
class Test {
    @Resource
    lateinit var iUserMapper: IUserMapper

    @ResponseBody
    @GetMapping("/name")
    fun getUsersByName(): String {
//        LogTools.LogPrint("Asa")
        return "${SpringUser("as", 12)}"
    }

    @ResponseBody
    @GetMapping("/getAll")
    fun getUsersAll(): String {
//        Tools.LogPrintln(iUserMapper.getUsersByName("b"), 3)
        return "${iUserMapper.getAllUser()}"
    }

}